//http请求
var http=require('http');

http.get('http://www.itsource.cn/',function (res) {

    var html='';

  res.on('data',function (txt) {
      // console.log('----------------');
      // console.log(txt.toString());
      html+=txt;
  })
    res.on('end',function () {
        console.log(html);
    })
});